#ifndef TESTWINDOW_H
#define TESTWINDOW_H

#include <QWidget>
#include <QApplication>
#include <QSharedPointer>

namespace Ui {
    class TestWindow;
}

class TestWindow : public QWidget {
    Q_OBJECT
public:
    TestWindow(QWidget *parent = 0);
    ~TestWindow();

    Ui::TestWindow *ui;
protected:
    void changeEvent(QEvent *e);

private:    
};

static TestWindow* testWindow()
{
    static QSharedPointer<TestWindow> w;
    if (w.isNull()){
        w = QSharedPointer<TestWindow>(new TestWindow(NULL));
        QObject::connect(qApp, SIGNAL(aboutToQuit()), w.data(), SLOT(close()));
    }

    return w.data();
}

#endif // TESTWINDOW_H
